﻿namespace Taobao.Model
{
    using Castle.ActiveRecord;
    using Castle.Components.Validator;
    using System;

    [ActiveRecord]
    public class OutSent : ActiveRecordValidationBase<OutSent>
    {
        private string _companyCode;
        private string _failure;
        private string _memo;
        private string _message;
        private string _ordertype;
        private long _outSentId;
        private string _outSid;
        private Taobao.Model.Trade _trade;

        [Property(ColumnType="String")]
        public virtual string CompanyCode
        {
            get
            {
                return this._companyCode;
            }
            set
            {
                this._companyCode = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string Failure
        {
            get
            {
                return this._failure;
            }
            set
            {
                this._failure = value;
            }
        }

        [ValidateLength(-2147483648, 250), Property(ColumnType="String")]
        public virtual string Memo
        {
            get
            {
                return this._memo;
            }
            set
            {
                this._memo = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string Message
        {
            get
            {
                return this._message;
            }
            set
            {
                this._message = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string OrderType
        {
            get
            {
                return this._ordertype;
            }
            set
            {
                this._ordertype = value;
            }
        }

        [PrimaryKey(PrimaryKeyType.Native, ColumnType="Int64")]
        public virtual long OutSentId
        {
            get
            {
                return this._outSentId;
            }
            set
            {
                this._outSentId = value;
            }
        }

        [Property(ColumnType="String")]
        public virtual string OutSid
        {
            get
            {
                return this._outSid;
            }
            set
            {
                this._outSid = value;
            }
        }

        [OneToOne]
        public virtual Taobao.Model.Trade Trade
        {
            get
            {
                return this._trade;
            }
            set
            {
                this._trade = value;
            }
        }
    }
}

